//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __STRATA_H
#define __STRATA_H

#define MAX_REGIONS	2

/* Intel Strata Flash(R) Flash Memory */
typedef enum strata_flash_type {
	STRATA_UNKNOWN, 
	STRATA_J3, 
	STRATA_K3, 
	STRATA_K18,
	STRATA_L3,
	STRATA_L18
}strata_flash_type;

struct strata_flash_region
{
	u32 offset;
	u32 block_num;
	u32 block_size;
};

struct strata_flash_descriptor
{
	u32 base;
	u32 buswidth;

	u32 id;
	u32 cache_size;
	enum strata_flash_type type;

	int region_num;
	struct strata_flash_region regions[MAX_REGIONS];
};

/* function interface */
extern int flash_erase(struct strata_flash_descriptor *chip, u32 dest, u32 len);
extern int flash_write(struct strata_flash_descriptor *chip, u32 dest, u8 *mem, u32 len);
extern int flash_probe(struct strata_flash_descriptor *chip);

#endif
